<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #box{
            width: 100px;
            height: 100px;
        }
    </style>
</head>
<body>
            <div id="box"></div>
            <script>
                var s =document.getElementById('box');
                var z = window.getComputedStyle(s)['height'];       //读取css中的高
                console.log(z)
            </script>
</body>
</html>
